from django.urls import path
from . import views

app_name = 'blog'
urlpatterns = [
    path('', views.IndexView.as_view(), name='index'),

    path('detail/<pk>/', views.ArticleDetailView.as_view(), name='detail'),

    path('comment/<pk>/', views.CommentView.as_view(), name='comment'),

    path('search', views.SearchView.as_view(), name='search'),
    path('archive/<year>/<month>', views.ArchiveView.as_view(), name='archive'),
    path('category/<pk>', views.CategoryView.as_view(), name='category'),
    path('tag/<pk>', views.TagView.as_view(), name='tag'),

    path('middletest', views.middletest, name='middletest')
]

# path('', ListView.as_view(
#     model=Article, template_name='blog/index.html',
#     paginate_by=settings.PER_PAGE), name='index'),

# path('', views.IndexView.as_view(), name='index'),

# urlpatterns = [
#     path('', views.index, name='index'),
#     path('detail/<pk>/', views.detail, name='detail'),
#
#     path('comment/<pk>/', views.comment, name='comment'),
#
#     path('search', views.search, name='search'),
#     path('archive/<year>/<month>', views.archive, name='archive'),
#     path('category/<pk>', views.category, name='category'),
#     path('tag/<pk>', views.tag, name='tag'),
# ]
